<include file="Public/header" />
    <div class="comm-top">
        <include file="Integral/nav" act_nav="part"/>
        <div class="title-left">兑换列表</div>
        <div class="title-right" style="top:8px;">
        <form method="get" action="{:U('gift_order')}">
            <input name="keywords" class="textarea search_inp" placeholder="请输入关键词" type="text" value="{:I('get.keywords')}"/>
            <input value="搜索" class="btn btn-success search_btn" type="submit" />
        </form>
        </div>
    </div>
    <div class="list-table">
        <div class="wrapper">
            <table class="stable">
                <thead>
                    <tr>
                        <th>LOGO</th>
                        <th>名称</th>
                        <th>积分</th>
                        <th>兑换时间</th>
                        <th>手机号</th>
                        <th>收货地址</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                    <foreach name="list" item="vo">
                        <tr>
                            <td class="img_td"><div style="background:url({:$vo['goods_pic']}) no-repeat center;background-size:cover;"></div></td>
                            <td>{$vo.goods_name|default='--'}</td>
                            <td>{$vo.order_integral_price|default='--'}</td>
                            <td>{$vo.create_time|default=0}</td>
                            <td>{$vo.contact_phone|default=0}</td>
                             <td>{$vo.contact_address|default=0}</td>
                            <td>
                            <if condition="$vo.status eq 3">
                            <a href="{:U('integral/order_info',array('id'=>$vo['id']))}"><i onclick="send_goods('{$vo.id}')" style="cursor:pointer;" class="glyphicon glyphicon-plane">查看详情</i></a>
                            <else/>
                             <i onclick="send_goods('{$vo.id}')" style="cursor:pointer;" class="glyphicon glyphicon-plane">发货</i>
                            </if>
                           </td>
                        </tr>
                    </foreach>
                </tbody>
            </table>
        </div>
    </div>
    <div class="page-list">{$page}</div>
    <include file="Public/dialog" />
<script type="text/javascript">
function send_goods(id){
    $.post('{:U("send_goods")}',{id:id},function(data){
        dialog(data,'在线发货',function(e){
            var obj = e.target;
			var dh = $('#dh').val();
			var gs = $('#gs').val();
		
			if(dh=='' || gs ==''){
			layer.msg('请把信息填写完整!');
			return false;
			}
            $.post('{:U("do_send_goods")}',$('#dataForm').serializeArray(),function(data){
                    note_info(data.info,obj);
                    setTimeout(function(){
                        layer.closeAll();
                    },1000);
					location.reload();
            });
        })
    });
}

</script>
<include file="Public/footer" />